Drawing.applySvgBrush Method

Applies any type of brush to a specified property on an SVG element, creating an element if necessary and assigning IDs.
 
 
Static This method is static.

Parameters

brush

Type: Brush
element

Type: SVGElement
The element to apply the brush to.
propertyName

Type: String
The name of the CSS property to apply the brush to.
width

Type: Number
The width of the element the brush is being applied to in pixels. This is required if brush is a LinearGradientBrush with a non-right-angle or if it is a radial gradient with dundas.controls.RadialGradientBrush.shapeType set to Circle or an ImageBrush.
Optional: True
height

Type: Number
The height of the element the brush is being applied to in pixels. This is required in the same cases as width.
Optional: True
toAttribute

Type: Boolean
True to set the property by its attribute rather than CSS.
Optional: True
x

Type: Number
The horizontal position of element in its coordinate space if not zero and if required according to isXYRequiredForSvgBrush.
Optional: True
y

Type: Number
The vertical position of element in its coordinate space if not zero and if required according to isXYRequiredForSvgBrush.
Optional: True
plotArea

Type: Object
The area defining the coordinate space in which element is positioned if not 100%.
 Structure:
     width   [type: Number]
     height  [type: Number]
 

Optional: True

Return Value


Type: SVGElement - May be null
An element referenced by element by ID to be added to the DOM tree for the brush to take effect.